@use "styles/Radius.module.scss";
@use "styles/Spacings.module.scss";
@use "styles/Typography.module.scss";

.stepper_wrapper {
  display: flex;
  width: 100%;
  justify-content: space-between;
  overflow: visible;

  .step {
    display: flex;
    flex-direction: column;
    border-radius: Radius.$circle;
    position: relative;

    .circle {
      width: 1.75rem;
      height: 1.75rem;
      background-color: var(--primary-0);
      border-radius: Radius.$circle;
      display: flex;
      justify-content: center;
      align-items: center;

      .inside_circle {
        width: 100%;
        height: 100%;
        border-radius: Radius.$circle;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }

    .step_info {
      margin-top: Spacings.$spacing03;
      display: flex;
      flex-direction: column;
      font-size: Typography.$tiny;
      width: 1.75rem;
      align-items: center;

      .step_index {
        white-space: nowrap;
        color: var(--text-1);
      }
    }

    &.done_step {
      .circle {
        background-color: var(--success);
      }

      .step_info {
        .step_status {
          color: var(--success);
        }
      }
    }

    &.current_step {
      .circle {
        background-color: var(--background-0);
        border: 1px solid var(--primary-0);
      }

      .inside_circle {
        background-color: var(--primary-0);
        width: 70%;
        height: 70%;
      }

      .step_info {
        .step_status {
          color: var(--primary-0);
        }
      }
    }

    &.pending_step {
      .circle {
        background-color: var(--primary-1);
      }

      .step_info {
        .step_status {
          color: var(--text-1);
        }
      }
    }

    &:first-child {
      .step_info {
        align-items: start;
      }
    }

    &:last-child {
      .step_info {
        align-items: end;
      }
    }
  }

  .bar {
    flex-grow: 1;
    height: 4px;
    border-radius: Radius.$big;
    background-color: var(--primary-1);
    margin: 0 8px;
    margin-top: Spacings.$spacing04;

    &.done {
      background-color: var(--success);
    }
  }
}
